package com.zhiyou100.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zhiyou100.service.BookService;

@Controller
@RequestMapping("book")
public class BookController {
	@Autowired
	private BookService bookService;
	
	@RequiresPermissions(value="book:select")
	@RequestMapping("show.do")
	public String show(Model model){
		model.addAttribute("books",bookService.queryAll());
		return"book/show";
	}
	
}
